import 'package:architecture/os_size.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:study_demo/ui/note/flutter_skill/flutter_skill_page.dart';
import 'package:study_demo/ui/note/rust_study/rust_study_page.dart';

import '../../widgets/text_button.dart';
import 'note_hall_controller.dart';

class NoteHallPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return GetBuilder<NoteHallController>(
        init: NoteHallController(),
        builder: (controller) {
          return Container(
              margin: EdgeInsets.only(top: 20),
              height: windowHeight,
              child: Wrap(
                  alignment: WrapAlignment.start,
                  crossAxisAlignment: WrapCrossAlignment.start,
                  spacing: 20,
                  runSpacing: 20,
                  children: [
                    MyTextButton(
                      text: "flutter命令",
                      confirm: () {
                        controller.goNoteDetail();
                      },
                    ),
                    MyTextButton(
                      text: "melos",
                      confirm: () {
                        controller.goMelos();
                      },
                    ),
                    MyTextButton(
                      text: "rust",
                      confirm: () {
                        Get.to(RustStudyPage());
                      },
                    ),
                    MyTextButton(
                      text: "flutter小技巧",
                      confirm: () {
                        Get.to(FlutterSkillPage());
                      },
                    ),
                  ]));
        });
  }
}
